/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package clinicapoo.view.utils;

import clinicapoo.model.Especialidade;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellRenderer;

/**
 *
 * @author Fabio Montezuma
 */
public class CellRenderer extends JLabel implements TableCellRenderer {

	@Override
	public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
	{
		if (value instanceof Especialidade)
		{
			Especialidade esp = (Especialidade) value;
			setText(esp.getNome());
		}

		return this;
	}

}
